from building import *

cwd = GetCurrentDir()
src = Split("""
sm_core.c
""")

if GetDepend(['STATE_MACHINE_BASE_RTTHREAD']):
    src += Glob('port/rt-thread/sm_port.c')

if GetDepend(['STATE_MACHINE_BASE_FREERTOS']):
    src += Glob('port/freertos/sm_port.c')

if GetDepend(['STATE_MACHINE_BASE_YSF']):
    src += Glob('port/ysf/sm_port.c')

cwd = GetCurrentDir()
CPPPATH = [cwd]

group = DefineGroup('StateMechine', src, depend = ['PKG_USING_STATE_MACHINE_FRAMEWORK'], CPPPATH = CPPPATH)

Return('group')
